﻿Imports System.Runtime.CompilerServices

Module DictionaryExtensions

    <Extension()>
    Public Function GetValueOrDefault(Of TKey, TValue)(ByVal dictionary As IDictionary(Of TKey, TValue), ByVal key As TKey) As TValue

        Dim value As TValue
        dictionary.TryGetValue(key, value)
        Return value

    End Function

End Module
